﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>产品列表</title>
<script type="text/javascript" src="http://cdn.goeasy.io/goeasy.js"></script>
<base href="<%=request.getContextPath()%>/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="bt/css/bootstrap-theme.min.css" />
<link rel="stylesheet" href="bt/css/bootstrap.min.css" />
<link href="style/adminStyle.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js"></script>
<script src="js/public.js"></script>
</head>
<body>
 <div class="wrap">
  <div class="page-title">
    <span class="modular fl"><i></i><em>产品列表</em></span>
    <span class="modular fr"><a href="invest/preAdd" class="pt-link-btn">+添加商品</a></span>
  </div>
  <div class="operate">
   <form>
    <select class="inline-select">
     <option>A店铺</option>
     <option>B店铺</option>
    </select>
    <input type="text" class="textBox length-long" placeholder="输入产品名称..."/>
    <input type="button" value="查询" class="tdBtn"/>
   </form>
  </div>
  <table class="list-style Interlaced">
   <tr>
   			<th>产品编号</th>
			<th>期数</th>
			<th>预期年利率</th>
			<th>投资期限</th>
			<th>起投金额</th>
			<th>最高可投</th>		
			<th>项目总额</th>
			<th>剩余可投</th>
			<th>相关材料</th>
			<th>投资类型</th>		
			<th>到期还款方式</th>
			<th>操作</th>
   </tr>
   <c:forEach var="invests" items="${list}">
   	 <tr>
    <td>
     <span>
     <input type="checkbox" class="middle children-checkbox"/>
     <i>${invests.proId}</i>
     </span>
    </td>
    <td class="center">${invests.proPeroids}</td>
    <!--
    
    <td class="td-name">
      <span class="ellipsis td-name block">这是产品或服务名称(宽度350px)</span>
    </td>
    
      -->
      
    
    <td class="center">
     <span>
      <i>%</i>
      <em>${invests.proRate}</em>
     </span>
    </td>
        <td class="center">
        ${invests.investTime}
    </td>
    <td class="center">
    ${invests.minMoney}
    </td>
    <td class="center">
    ${invests.maxMoney}
    </td>
    <td class="center">${invests.proTotal}</td>
    <td class="center">${invests.remainMoney}</td>
    <td class="center">${invests.res.resName}</td>
    <td class="center">${invests.it.investtypeName}</td>
    <td class="center">${invests.rt.repaytypeName}</td>
    <td class="center">
     <a href="invest/index" title="查看" target="_blank"><img src="images/icon_view.gif"/></a>
     <a href="invest/preUpdate?proId=${invests.proId}" title="编辑"><img src="images/icon_edit.gif"/></a>
     <a title="删除" href="invest/delete/${invests.proId}"><img src="images/icon_drop.gif"/></a>
    </td>
   </tr>
   
   
   
   </c:forEach>
  
  </table>
  <!-- BatchOperation -->
  <div style="overflow:hidden;">
      <!-- Operation -->
	  <div class="BatchOperation fl">
	   <input type="checkbox" id="del"/>
	   <label for="del" class="btnStyle middle">全选</label>
	   <input type="button" value="批量删除" class="btnStyle"/>
	  </div>
	  
	  
	  
	  
	  <!-- 分页 -->
	<div class="turnPage center fr">
	 	<ul class="pagination">
	 			<!-- 上一页 -->
			<!-- 判断当前页是否是第一页 -->
			<c:if test="${pageBean.currentPage==1 }">
				<li class="disabled">
					<a href="javascript:void(0);">&laquo;</a>
				</li>
			</c:if>
			<c:if test="${pageBean.currentPage!=1 }">
				<li>
					<a href="invest/list?currentPage=${pageBean.currentPage-1}" >
						&laquo;
					</a>
				</li>
			</c:if>	
	 		
	 		<c:forEach begin="1" end="${pageBean.totalPage}" var="page">
	 			<c:if test="${pageBean.currentPage==page }">
					<li class="active"><a href="javascript:void(0);">${page}</a></li>
				</c:if>
				<c:if test="${pageBean.currentPage!=page }">
					<li><a href="invest/list?currentPage=${page}">${page}</a></li>
				</c:if>
	 		</c:forEach>
	 		
	 			<!-- 判断当前页是否是最后一页 -->
			<c:if test="${pageBean.currentPage==pageBean.totalPage }">
				<li class="disabled">
					<a href="javascript:void(0);">&raquo;</a>
				</li>
			</c:if>
			<c:if test="${pageBean.currentPage!=pageBean.totalPage }">
				<li>
					<a href="invest/list?currentPage=${pageBean.currentPage+1}" >
						&raquo;
					</a>
				</li>
			</c:if>	
	 	<!-- 
	 	<li><a href="#">&laquo;</a></li>
	<li class="active"><a href="#">1</a></li>
	<li class="disabled"><a href="#">2</a></li>
	<li><a href="#">3</a></li>
	<li><a href="#">4</a></li>
	<li><a href="#">5</a></li>
	<li><a href="#">&raquo;</a></li>
	 -->
	
		</ul>
	 </div>
  </div>
 </div>
</body>
<script type="text/javascript">
        var goEasy = new GoEasy({
             appkey: 'BC-46e4b5f6cf394e4396e56de4051f9b8a'
        });
        goEasy.subscribe({
            channel: 'demo_channe2',
            onMessage: function(message){
                alert('收到：'+message.content);
            }
        });
</script>
</html>